$(function() {
	var GJScript = {
		createDiv : function(id,name) {
			return $('<div/>').attr({id:id,name:name});
		},
		createInput : function(id, name, type, value) {
			return $('<input/>').attr({ id:id, name:name, type:type, value:value });
		}
	};
	if (!window.GJ) {window.GJ = GJScript;}
	
	var header = GJ.createDiv('sm_header','header').addClass("header");
	$("body").append(header);
	var body = GJ.createDiv('sm_body','body').addClass("body");
	$("body").append(body);
	var slider = GJ.createDiv('sm_slider','slider').addClass("slider");
	$("#sm_body").append(slider);
	var button = GJ.createInput("button1","button","button", "Click");
	$("#sm_slider").append(button);
	
	$("#button1").click(function() {
		if ($('#sm_slider').is(':hidden')) {
            $('#sm_slider').show('slide',{direction:'left'},1000);
         } else {
            $('#sm_slider').hide('slide',{direction:'left'},1000);
         }
	});
})(); 